import Vue from 'vue';
import formatTime from '@/utils/formatTime';
import {
  Tabbar, TabbarItem, Search, Swipe, SwipeItem, Lazyload, Grid, GridItem, Popup, NavBar, Icon, Tab, Tabs, SubmitBar, Checkbox, Dialog,
  Collapse, CollapseItem, GoodsAction, GoodsActionIcon, GoodsActionButton, Field, Button, Form, CellGroup, Cell, Popover, List,
} from 'vant';
import App from './App.vue';
import router from './router';
import store from './store';

Vue.use(Tabbar).use(TabbarItem).use(Search).use(Swipe)
  .use(SwipeItem)
  .use(Lazyload, {
    lazyComponent: true,
  })
  .use(Grid)
  .use(GridItem)
  .use(Popup)
  .use(NavBar)
  .use(Icon)
  .use(Tab)
  .use(Tabs)
  .use(Collapse)
  .use(CollapseItem)
  .use(SubmitBar)
  .use(Checkbox)
  .use(Dialog)
  .use(GoodsAction)
  .use(GoodsActionIcon)
  .use(GoodsActionButton)
  .use(Field)
  .use(Button)
  .use(Form)
  .use(CellGroup)
  .use(Cell)
  .use(Popover)
  .use(List);

Vue.filter('formatTime', formatTime);
Vue.config.productionTip = false;

new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount('#app');
